package com.petrooil.core.service;

import com.petrooil.core.dao.CrudDao;
import com.petrooil.core.model.UserDepartment;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.io.Serializable;

@Service("userDepartmentService")
public class UserDepartmentService implements IUserDepartmentService {

    @Autowired
    private CrudDao<UserDepartment> userDepartmentDao;

    @Override
    public UserDepartment create(UserDepartment userDepartment) {
        return userDepartmentDao.create(userDepartment);
    }

    @Override
    public UserDepartment get(Serializable id) {
        return userDepartmentDao.get(id);
    }

    @Override
    public UserDepartment update(UserDepartment userDepartment) {
        return userDepartmentDao.update(userDepartment);
    }

    @Override
    public void delete(UserDepartment userDepartment) {
        userDepartmentDao.delete(userDepartment);
    }
}
